import com.github.sardine.SardineFactory
import java.io.File

sealed class Foo {
    abstract var name: String

    data class Other(override var name: String) : Foo()


}

fun main(args: Array<String>) {
    var other = Foo.Other("DerivedFoo")
    println(other.name)
//    var sardine = SardineFactory.begin("2425875132@qq.com",
//            "a8tfvd9949gces8j")
//    try {
//        val list = sardine.list("https://dav.jianguoyun.com/dav/")
//        list.forEach { it ->
//            print(it.displayName)
//        }
    var sardine = SardineFactory.begin("2425875132@qq.com",
            "a8tfvd9949gces8j")

    sardine.put(
            "https://dav.jianguoyun.com/dav/DAV/ns.png",
            File("F:\\JavsProj\\kotlin\\src\\rxjava2\\groccery\\ns.png"),"image/*",true)


//    } catch (e: IOException) {
//        e.printStackTrace()
//    }


}